package mk.timska_rabota_android.contacts;

public class Contact {
	String ID;
	String name;
	String phoneNumber;
	String email;
	String regId;
	public String getID() {
		return ID;
	}
	public void setID(String iD) {
		ID = iD;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getPhoneNumber() {
		return phoneNumber;
	}
	public void setPhoneNumber(String phoneNumber) {
		this.phoneNumber = phoneNumber;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getregId(){
		return this.regId;
	}
	public void setregId(String regCode){
		regId = regCode;
	}
	/**
	 * Returns a copy of this contact
	 * */
	public Contact getContact(){
		return new Contact(this);
	}
	/**
	 * Copy constructor
	 * Creates hard copy of the contact
	 * */
	public Contact(Contact origin){
		Contact retVal = new Contact();
		retVal.setID(this.ID);
		retVal.setEmail(this.email);
		retVal.setName(this.name);
		retVal.setPhoneNumber(this.phoneNumber);
	}
	/**
	 * Main Constructor for Contact Class
	 * Arguments:
	 * 	-ID - 			Unique identifier of account
	 *  -name - 		Display name of account
	 *  -phoneNumber -	Phone number for account: Format: +CCCAANNNNNN
	 *  -email - 		Email for the account
	 * */
	public Contact(String iD, String name, String phoneNumber, String email) {
		super();
		ID = iD;
		this.name = name;
		this.phoneNumber = phoneNumber;
		this.email = email;
	}
	/**
	 * NULL Constructor
	 * All values are set to null
	 * Use Setters to assign values
	 * Needed ID,name,phoneNumber,email
	 * */
	public Contact(){
		ID = null;
		name = null;
		phoneNumber = null;
		email = null;
	}
	
	public String toString(){
		StringBuilder a = new StringBuilder();
		a.append(ID);
		a.append(" - ");
		a.append(name);
		a.append(" - ");
		a.append(email);
		a.append(" - ");
		a.append(phoneNumber);
		
		return a.toString();
	}
	
}
